import request from "@/utils/request";

//员工考勤信息(员工首页)
export function getChartBar(userId) {
  return request({
    url: "/attendance/chart_bar",
    method: "get",
    params: { userId }
  });
}

//员工考勤详情信息(考勤页日历数据)
export function getCalendarData(userId){
  return request({
    url: "/attendance/detail_calendar",
    method: "get",
    params: { userId }
  });
}

//员工考勤统计(考勤页，百分比)
export function getChartPercent(userId,year,month){
  return request({
    url:'/attendance/chart_percent',
    method:'post',
    params:{
      userId,
      year,
      month
    }
  })
}

//员工考勤基本信息
export function getAttend(employeeId) {
  return request({
    url: "/employee/attend",
    method: "get",
    params: {employeeId}
  });
}

//本周考勤统计
export function getWeekAttend(departmentId){
  return request({
    url: "/manager/getWeekAttend",
    method:'get',
    params:{departmentId}
  });
}

//缺勤名单
export function getAbsentStatus(departmentId){
  return request({
    url: "/manager/getAbsentStatus",
    method:'get',
    params:{departmentId}
  });
}